﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BoxProContent.ascx.cs" Inherits="FreshCms.BackEnd.Controls.Module.Box.BoxProContent" %>
<div id="page-content" class="block">
    <div class="block-header">
        <a href="javascript:void(0)" class="header-title-link">
            <h1>Quản lý box sản phẩm</h1>
        </a>
    </div>
    <div class="row gutter30">
        <div class="col-sm-12">
            <ul class="nav nav-tabs push" id="lstBtnNavigator">
                <asp:Repeater ID="rptNavigator" runat="server">
                    <ItemTemplate>
                        <li class="" id="tab_<%# Eval("ID")%>"><a href="/BackEnd/?ui=<%=panelId %>&boxid=<%# Eval("ID")%>"><%# Eval("Name")%></a></li>        
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
    </div>
    <div class="row gutter30">
        
        <!-- danh sach item co trong he thong -->
        <div class="col-sm-6">
            <h4 class="sub-header">Danh sách sản phẩm</h4>
            <div class="col-sm-12" style="margin-bottom: 20px;">
                <div class="col-sm-6">
                    <input type="text" id="txtProName" class="form-control" value="" placeholder="Nhập tên sản phẩm bạn muốn tìm">
                </div>
                <div class="col-sm-3">
                    <asp:DropDownList ID="ddlCate" runat="server" CssClass="form-control" size="1"></asp:DropDownList>
                </div>
                <div class="col-sm-3">
                    <button type="button" id="btnSearch" class="btn btn-sm btn-info"><i class="gi gi-search mr5"></i>Tìm kiếm</button>
                </div>
            </div>

            
            <div class="col-sm-12" style="margin-bottom: 20px;">
                <div class="table-responsive" id="lstCategory">
                <table id="Table1" class="table table-hover">
                    <thead>
                        <tr>
                            <th class="text-center" style="width: 60px;">ID</th>
                            <th>Tên sản phẩm</th>
                            <th class="text-center" style="width: 150px;">Thao tác</th>
                        </tr>
                    </thead>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <tbody>
                    <tr id="tr1">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="btnUpdate" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr2">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button1" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr3">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button2" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr4">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button3" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr5">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button4" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr6">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button5" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr7">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button6" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr8">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button7" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr9">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button8" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr10">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button9" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr11">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button10" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr12">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button11" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr13">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button12" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr14">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button13" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr15">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button14" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr16">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button15" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr17">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button16" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr18">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button17" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr19">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button18" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr20">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button19" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr21">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button20" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr22">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button21" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr23">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button22" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                    <tr id="tr24">
                        <td class="text-center">1</td>
                        <td>Tên sản phẩm</td>
                        <td class="text-center">
                            <button type="button" id="Button23" class="btn btn-sm btn-success"><i class="hi hi-log_in mr5"></i>Chọn</button>
                        </td>
                    </tr>
                </tbody>
                </table>
                </div>
            </div>
        </div>

        <!-- danh sach item co trong Box -->
        <div class="col-sm-6">
            <h4 class="sub-header">Danh sách sản phẩm trong Box</h4>
            <div class="col-sm-12" style="">
                <div class="form-group text-center" style="margin-bottom: 20px;">
                    <button type="button" id="btnPublish" class="btn btn-sm btn-info"><i class="gi gi-file_export mr5"></i>Xuất bản</button>
                </div>
                
            </div>
            <div class="col-sm-12" style="margin-bottom: 20px;">
                <div class="table-responsive slimBorder" id="lstCategory1">
                    <table id="tblParent" class="table table-hover">
                        <thead>
                            <tr>
                                <th class="text-center" style="width: 60px;">#</th>
                                <th class="text-center" style="width: 60px;">Xóa</th>
                                <th class="text-center" style="width: 60px;"></th>
                                <th>Tên sản phẩm</th>
                                <th class="text-center" style="width: 120px;">Ảnh đại diện</th>
                                <th class="text-center" style="width: 100px;">Thao tác</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr id="trMain_">
                                <td class="text-center">1</td>
                                <td class="text-center">
                                    <div class="btn-group dropup text-left">
                                        <a href="javascript:void(0)" data-toggle="dropdown" class="btn btn-xs btn-default btn-danger dropdown-toggle"><i class="gi gi-bin"></i> </a>
                                        <ul class="dropdown-menu dropdown-menu-delete dropright">
                                            <li><a href="javascript:void(0)" onclick="DeleteData(1, 'tieu de')" >Xóa khỏi Box</a></li>
                                            <li><a href="javascript:void(0)">Hủy</a></li>
                                        </ul>
                                    </div>
                                </td>
                                <td class="text-center">
                                    <a href="javascript:void(0)" data-toggle="tooltip" title="" class="btn btn-xs btn-default btn-info"
                                        data-original-title="Đưa lên trên" onclick="OrderCate(1, 1)"><i class="gi gi-up_arrow"></i></a>
                                    <a href="javascript:void(0)" data-toggle="tooltip" title="" class="btn btn-xs btn-default btn-info"
                                        data-original-title="Chuyển xuống dưới" onclick="OrderCate(1, 0)"><i class="gi gi-down_arrow"></i></a>
                                </td>
                                <td>ádasd</td>
                                <td class="text-center"><img id="avatar" src="/BackEnd/img/no_thumb.png" style="max-width: 100px; max-height:50px"></td>
                                <td class="text-center"><a href="/BackEnd/?ui=3" id="btnBack" class="btn btn-sm btn-primary"><i class="gi gi-picture mr5"></i>Đổi ảnh</a></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>
</div>

<script>
    var boxid;
    boxid = <%=boxId %>;
    console.log(boxid);
    
    if(boxid>0) {
        $('#tab_' + boxid).addClass('active');
    }

    $(function () {
        $("#lstCategory").slimScroll({
            height: 600,
            color: "#000000",
            size: "3px",
            color: "#000000",
            touchScrollStep: 0
        });
    });

    $(function () {
        $("#lstCategory1").slimScroll({
            height: 600,
            color: "#000000",
            size: "3px",
            color: "#000000",
            touchScrollStep: 0
        });
    });
</script>